package com.tenc.feign;
import com.tenc.pojo.ErrorJson;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 获取企业微信access_token
 */
@Component
@FeignClient(name = "wechatInitService",url = "${wechat.company.url}")
public interface InitService {

    /**
     * 获取Access_Token
     * @param corpid 企业ID
     * @param corpsecret 应用的凭证密钥
     * @return JSON
     */
    @GetMapping("/gettoken")
    ErrorJson getAccessToken(@RequestParam("corpid")String corpid, @RequestParam("corpsecret")String corpsecret);
}
